<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=\
  , initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <div id="app">
    <div v-if="showType === 1">
      <img
        src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fs6.sinaimg.cn%2Fbmiddle%2F99547121tc7856425e2a5%26690&refer=http%3A%2F%2Fs6.sinaimg.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg"
        alt="">
    </div>
    <div v-else-if="showType === 2">
      <input type="search" name="" id="">
    </div>
    <div v-else>
      <h1>没有图片哦</h1>
    </div>

    <div v-if="type === 'A'">
      A
    </div>
    <div v-else-if="type === 'B'">
      B
    </div>
    <div v-else-if="type === 'C'">
      C
    </div>
    <div v-else>
      Not A/B/C
    </div>


  </div>

  <script src="./js/vue.js"></script>
  <script>
    const app = new Vue({
      el: "#app",
      data: {
        showType: 2,
        type: "D"
      }
    })
  </script>
</body>

</html>